﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TimeSlot.aspx.cs" Inherits="中学____排课系统.TimeSlot" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
        </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TimeSlotID" DataSourceID="SqlDataSource1" Height="189px" Width="455px">
            <Columns>
                <asp:BoundField DataField="TimeSlotID" HeaderText="TimeSlotID" ReadOnly="True" SortExpression="TimeSlotID" />
                <asp:BoundField DataField="StartTime" HeaderText="StartTime" SortExpression="StartTime" />
                <asp:BoundField DataField="EndTime" HeaderText="EndTime" SortExpression="EndTime" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:中学排课系统ConnectionString %>" DeleteCommand="DELETE FROM [TimeSlot] WHERE [TimeSlotID] = @TimeSlotID" InsertCommand="INSERT INTO [TimeSlot] ([TimeSlotID], [StartTime], [EndTime]) VALUES (@TimeSlotID, @StartTime, @EndTime)" SelectCommand="SELECT * FROM [TimeSlot]" UpdateCommand="UPDATE [TimeSlot] SET [StartTime] = @StartTime, [EndTime] = @EndTime WHERE [TimeSlotID] = @TimeSlotID">
            <DeleteParameters>
                <asp:Parameter Name="TimeSlotID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="TimeSlotID" Type="Int32" />
                <asp:Parameter DbType="Time" Name="StartTime" />
                <asp:Parameter DbType="Time" Name="EndTime" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter DbType="Time" Name="StartTime" />
                <asp:Parameter DbType="Time" Name="EndTime" />
                <asp:Parameter Name="TimeSlotID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>
